import { gatewayBaseUrl, runtimeConfig } from '~/utils/commonData'
import httpRequest from '../server/index'

interface RequestData {
  [key: string]: any // 适用于动态数据结构，可根据实际需求修改
}

function submitCompany(data?: RequestData): Promise<any> {
  const baseURL = gatewayBaseUrl(runtimeConfig())
  return httpRequest.post(`/api/user-center/abroadCompany/submit`, data, {
    server: false,
    baseURL,
  })
}
function queryDetail(data?: RequestData): Promise<any> {
  const baseURL = gatewayBaseUrl(runtimeConfig())
  return httpRequest.get(`/api/user-center/abroadCompany/queryDetailByCompanyType`, data, {
    server: false,
    baseURL,
  })
}

export { queryDetail, submitCompany }
